Skip to content

gh-157778: Include opening brace line in multiline f-string errors - #157779

Merged
pablogsal merged 1 commit into
python:mainfrom
pablogsal:fix-fstring-unclosed-field
Sep 24, 2026
Merged

pablogsal merged 1 commit into
python:mainfrom
pablogsal:fix-fstring-unclosed-field

Conversation

@pablogsal

@pablogsal pablogsal commented Sep 19, 2026 •

Copy link
Copy Markdown
Member

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the new feature (more complete error message), but I feel unable to review this change. At least, it adds tests, good!

@pablogsal

Copy link
Copy Markdown
Member Author

I like the new feature (more complete error message), but I feel unable to review this change. At least, it adds tests, good!

No problem was just in case you wanted to take a look!

@pablogsal pablogsal added the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Sep 23, 2026
@vstinner

Copy link
Copy Markdown
Member

@pablogsal added the needs backport to 3.15 label

It might be a little bit late to change error messages in Python 3.15, no? Some projects may start relaying on Python 3.15.0 error messages.

@pablogsal

Copy link
Copy Markdown
Member Author

@pablogsal added the needs backport to 3.15 label

It might be a little bit late to change error messages in Python 3.15, no? Some projects may start relaying on Python 3.15.0 error messages.

We have never promised the stability of error messages, specially syntax errors. If you feel strongly I will not backport it but otherwise I think is beneficial and we have done it before (is a fix on the error message).

@vstinner

Copy link
Copy Markdown
Member

I don't feel strongly, if you're confident, go ahead on the backport :-)

@pablogsal
pablogsal merged commit 1cdd590 into python:main Sep 24, 2026
59 checks passed
@pablogsal
pablogsal deleted the fix-fstring-unclosed-field branch September 24, 2026 00:23
@miss-islington-app

Copy link
Copy Markdown

Thanks @pablogsal for the PR 🌮🎉.. I'm working now to backport this PR to: 3.15.
🐍🍒⛏🤖

@miss-islington-app

Copy link
Copy Markdown

Sorry, @pablogsal, I could not cleanly backport this to 3.15 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 1cdd590cb547597ab64b20c4b8a0c5b5b2f62b7a 3.15

@miss-islington-app miss-islington-app Bot assigned pablogsal and unassigned vstinner Sep 24, 2026
@bedevere-app

bedevere-app Bot commented Sep 24, 2026

Copy link
Copy Markdown

GH-158047 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Sep 24, 2026
pablogsal added a commit that referenced this pull request Sep 24, 2026
…rors (GH-157779) (#158047)

gh-157778: Include opening brace line in multiline f-string errors (#157779)

(cherry picked from commit 1cdd590)
@bedevere-bot

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot x86-64 macOS 3.15 (tier-2) has failed when building commit 3b9fa19.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/2031/builds/377) and take a look at the build logs.
  4. Check if the failure is related to this commit (3b9fa19) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/2031/builds/377

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):
  File "/Users/buildbot/buildarea/3.15.billenstein-macos/build/Lib/unittest/case.py", line 637, in _callTestMethod
    result = method()
ResourceWarning: unclosed <socket.socket fd=7, family=2, type=1, proto=6, laddr=('127.0.0.1', 61375)>
k


Traceback (most recent call last):
  File "/Users/buildbot/buildarea/3.15.billenstein-macos/build/Lib/unittest/case.py", line 637, in _callTestMethod
    result = method()
ResourceWarning: unclosed <socket.socket fd=7, family=2, type=1, proto=6, laddr=('127.0.0.1', 65232)>
k

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants